import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Rank from '../views/Rank.vue'
import playListDetail from '../components/playListDetail/PlayListDetail.vue'
import RankListDetail from '../components/rank/RankListDetail.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/rank',
    name: 'Rank',
    component: Rank
  },
  {
    path: '/PlayListDetail/:id',
    name: 'PlayListDetail',
    component: playListDetail
  },
  {
    path: '/RankListDetail/:id',
    name: 'RankListDetail',
    component: RankListDetail
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
